package com.xuyoupeng.springlearn.bean.aop.impl;

import com.xuyoupeng.springframework.beans.factory.annotation.Autowired;
import com.xuyoupeng.springframework.beans.factory.annotation.Value;
import com.xuyoupeng.springframework.stereotype.Component;
import com.xuyoupeng.springlearn.bean.aop.CustomerDao;
import com.xuyoupeng.springlearn.bean.aop.ICustomerService;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xuyoupneg
 * @description TODO
 * @date 2024/4/7 22:25
 */
@Component(value = "customerService")
public class CustomerService implements ICustomerService {
    @Value("${customerKey}")
    private String customerKey;

    @Autowired
    CustomerDao customerDao;
    @Override
    public String queryCustomerName(String customerId) {
        return customerDao.queryCustomerName("1") + customerKey;
    }

    @Override
    public String addCustomer(String customerId, String customerName) {
        return null;
    }
    @Override
    public String getCustomerKey() {
        return customerKey;
    }

    public void setCustomerKey(String customerKey) {
        this.customerKey = customerKey;
    }
}
